package com.ibeeking.gmc.global.api.feign;


import com.ibeeking.gmc.global.api.feign.fallback.GlobalMsgBaseCodeFeignFallbackFactory;
import com.ibeeking.gmc.global.api.feign.fallback.GlobalTenantFeignFallbackFactory;
import com.ibeeking.found.common.entity.MsgBaseCodeDTO;
import com.ibeeking.gmc.global.api.common.query.MsgBaseCodeFeignQuery;
import com.ibeeking.nematos.utils.result.ResponseResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * @Author ibeeking
 */
@FeignClient(name = "gmc-global-g-server", contextId = "globalMsgBaseCodeFeignClient", path = "/g", fallbackFactory = GlobalMsgBaseCodeFeignFallbackFactory.class, decode404 = true)
public interface GlobalMsgBaseCodeFeignClient {

 /**
  * 查询消息基本信息列表
  *
  * @param query
  * @return
  */
 @PostMapping(value = "/msgBaseCode/feign/v1/queryMsgBaseCodeList")
 ResponseResult<List<MsgBaseCodeDTO>> queryMsgBaseInfoList(@RequestBody MsgBaseCodeFeignQuery query);

 /**
  * 根据id查询消息基本信息
  *
  * @param id
  * @return
  */
 @PostMapping(value = "/msgBaseCode/feign/v1/queryMsgBaseCodeDtoById/{id}")
 ResponseResult<MsgBaseCodeDTO> queryMsgBaseCodeDtoById(@PathVariable("id") Long id);

 /**
  * 根据code查询消息基本信息
  *
  * @param code
  * @return
  */
 @PostMapping(value = "/msgBaseCode/feign/v1/queryMsgBaseCodeDtoByCode/{code}")
 ResponseResult<MsgBaseCodeDTO> queryMsgBaseCodeDtoByCode(@PathVariable("code") String code);

}
